-----------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/Mark 1/Dropbox/Grant Proposals ICES/ISQ Response/Accepted/replication/replicating table 3.log
  log type:  text
 opened on:  10 Jun 2015, 16:29:14

. do "/Users/Mark 1/Dropbox/Grant Proposals ICES/ISQ Response/Accepted/replication/crescenzi-kadera-table3.do"

. **  Replication file for Table 3 from Crescenzi and Kadera, 2014. 
. **  "Built to Last: Understanding the Link between Democracy and Conflict
. **  in the International System."
. 
. **  This is a response piece. Original Article: Gartzke, Erik and Alex Weisiger. 
. **  2014 ‚"Under Construction:  Development, Democracy, and Difference as 
. **  Determinants of Systemic Liberal Peace,‚Äù International Studies Quarterly 
. **  58(2):130-145.
. 
. ** Original Gartzke & Weisiger Replication Files can be found here:
. ** http://thedata.harvard.edu/dvn/dv/weisiger
. 
. * Analyses in Crescenzi & Kadera was performed using STATA 13.1
. 
. use "crescenzi-kadera-2015-ISQ-Table3.dta"

. 
. 
. *MODEL A, also MODEL 5 in G&W*
. 
. * original code for Model 14
. *relogit deadlyl polave pcenerg diff1 demloi engypop dydiff logdist cntgdumy allydumy capratio onemajor deadyrs
>  deadyer*, cluster(dyadid)
. 
. * we generated a squared term using the polity average variable provided by G&W
. *gen polavesq = polave*polave
. 
. *TABLE 3*
. 
. *Model G: Model 14 replicated.*
. *note: relogit does not work in STATA 13.1, but the results are nearly identical.
. logit deadlyl polave pcenerg diff1 demloi engypop dydiff logdist cntgdumy allydumy capratio onemajor deadyrs de
> adyer*, cluster(dyadid)

Iteration 0:   log pseudolikelihood = -5039.3877  
Iteration 1:   log pseudolikelihood =  -4357.148  
Iteration 2:   log pseudolikelihood = -3903.1551  
Iteration 3:   log pseudolikelihood =   -3897.96  
Iteration 4:   log pseudolikelihood = -3897.9324  
Iteration 5:   log pseudolikelihood = -3897.9324  

Logistic regression                             Number of obs     =    619,104
                                                Wald chi2(15)     =    1528.52
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -3897.9324               Pseudo R2         =     0.2265

                            (Std. Err. adjusted for 18,488 clusters in dyadid)
------------------------------------------------------------------------------
             |               Robust
     deadlyl |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      polave |  -.0532154   .0337846    -1.58   0.115    -.1194319    .0130012
     pcenerg |  -.6431298   .1301221    -4.94   0.000    -.8981645   -.3880951
       diff1 |   .6504967   .0849021     7.66   0.000     .4840917    .8169017
      demloi |  -.0474297    .037888    -1.25   0.211    -.1216889    .0268295
     engypop |  -.0774616    .061853    -1.25   0.210    -.1986912     .043768
      dydiff |   .1054298    .023252     4.53   0.000     .0598567    .1510028
     logdist |  -.2388299   .0567368    -4.21   0.000     -.350032   -.1276277
    cntgdumy |   1.534962   .4256863     3.61   0.000     .7006323    2.369292
    allydumy |  -.2768506   .1675329    -1.65   0.098    -.6052091    .0515078
    capratio |   2.495518   .4512339     5.53   0.000     1.611116     3.37992
    onemajor |   1.655771   .1761591     9.40   0.000     1.310506    2.001037
     deadyrs |  -.1951658   .0288407    -6.77   0.000    -.2516926    -.138639
    deadyer1 |  -.0007247    .000186    -3.90   0.000    -.0010892   -.0003602
    deadyer2 |   .0003051    .000108     2.82   0.005     .0000933    .0005168
    deadyer3 |  -8.38e-06    .000021    -0.40   0.690    -.0000496    .0000328
       _cons |  -9.034837   .7168882   -12.60   0.000    -10.43991   -7.629762
------------------------------------------------------------------------------

. 
. *Model H: Adding a squared term to "systemic democracy"*
. *note: we center any variable before squaring it here, but uncentered models are also provided. 
. *      the results are substantively equivalent across all models.
. 
. *logit deadlyl polave polavesq pcenerg diff1 demloi engypop dydiff logdist cntgdumy allydumy capratio onemajor 
> deadyrs deadyer*, cluster(dyadid)
. logit deadlyl c_polave c_polavesq pcenerg diff1 demloi engypop dydiff logdist cntgdumy allydumy capratio onemaj
> or deadyrs deadyer*, cluster(dyadid)

Iteration 0:   log pseudolikelihood = -5039.3877  
Iteration 1:   log pseudolikelihood = -4356.9069  
Iteration 2:   log pseudolikelihood = -3896.7176  
Iteration 3:   log pseudolikelihood =  -3890.264  
Iteration 4:   log pseudolikelihood = -3890.2222  
Iteration 5:   log pseudolikelihood = -3890.2222  

Logistic regression                             Number of obs     =    619,104
                                                Wald chi2(16)     =    1494.78
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -3890.2222               Pseudo R2         =     0.2280

                            (Std. Err. adjusted for 18,488 clusters in dyadid)
------------------------------------------------------------------------------
             |               Robust
     deadlyl |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    c_polave |   -.131361   .0407482    -3.22   0.001    -.2112261   -.0514959
  c_polavesq |  -.0436963   .0118166    -3.70   0.000    -.0668564   -.0205361
     pcenerg |  -.4233579   .1483087    -2.85   0.004    -.7140376   -.1326783
       diff1 |   .3589191   .1222265     2.94   0.003     .1193597    .5984786
      demloi |  -.0477106   .0382615    -1.25   0.212    -.1227018    .0272805
     engypop |  -.0719033   .0597031    -1.20   0.228    -.1889191    .0451125
      dydiff |   .1069168   .0229703     4.65   0.000     .0618957    .1519378
     logdist |  -.2408391   .0559986    -4.30   0.000    -.3505944   -.1310839
    cntgdumy |    1.50433   .4215589     3.57   0.000     .6780894     2.33057
    allydumy |  -.2427173   .1671462    -1.45   0.146    -.5703179    .0848833
    capratio |    2.48659   .4487747     5.54   0.000     1.607008    3.366172
    onemajor |   1.655236   .1738791     9.52   0.000      1.31444    1.996033
     deadyrs |  -.1988687   .0287266    -6.92   0.000    -.2551719   -.1425655
    deadyer1 |  -.0007283   .0001858    -3.92   0.000    -.0010924   -.0003642
    deadyer2 |   .0003064    .000108     2.84   0.005     .0000947    .0005181
    deadyer3 |  -8.61e-06   .0000211    -0.41   0.683    -.0000499    .0000327
       _cons |  -7.303017   .8873423    -8.23   0.000    -9.042176   -5.563858
------------------------------------------------------------------------------

. 
. *Model I: Demcom and DemCom^2*
. *note: regstrength is the Democratic Community variable developed in 
. * Kadera, Crescenzi & Shannon, AJPS 2003. It is the only variable added to this analysis. The rest of the varia
> bles are used directly from 
. * G&W replication files.
. 
. *logit deadlyl regstrength regstrsq pcenerg demloi engypop logdist cntgdumy allydumy capratio onemajor deadyrs 
> deadyer*, cluster(dyadid)
. logit deadlyl c_regstrength c_regstrengthsq pcenerg demloi engypop logdist cntgdumy allydumy capratio onemajor 
> deadyrs deadyer*, cluster(dyadid)

Iteration 0:   log pseudolikelihood = -5039.3877  
Iteration 1:   log pseudolikelihood = -4374.6493  
Iteration 2:   log pseudolikelihood = -3951.9219  
Iteration 3:   log pseudolikelihood = -3946.2234  
Iteration 4:   log pseudolikelihood =  -3946.181  
Iteration 5:   log pseudolikelihood =  -3946.181  

Logistic regression                             Number of obs     =    619,104
                                                Wald chi2(14)     =    1462.88
                                                Prob > chi2       =     0.0000
Log pseudolikelihood =  -3946.181               Pseudo R2         =     0.2169

                               (Std. Err. adjusted for 18,488 clusters in dyadid)
---------------------------------------------------------------------------------
                |               Robust
        deadlyl |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
----------------+----------------------------------------------------------------
  c_regstrength |    .140625   .0371778     3.78   0.000     .0677579     .213492
c_regstrengthsq |  -.0442074   .0090159    -4.90   0.000    -.0618782   -.0265366
        pcenerg |  -.1955626   .1015601    -1.93   0.054    -.3946169    .0034916
         demloi |  -.1089554   .0349964    -3.11   0.002    -.1775471   -.0403637
        engypop |  -.0430819   .0462165    -0.93   0.351    -.1336645    .0475008
        logdist |  -.2240442    .057267    -3.91   0.000    -.3362855   -.1118028
       cntgdumy |   1.522997   .4318699     3.53   0.000     .6765473    2.369446
       allydumy |  -.3172936   .1695512    -1.87   0.061    -.6496078    .0150206
       capratio |   2.408749   .4745177     5.08   0.000     1.478712    3.338787
       onemajor |   1.611483   .1836377     8.78   0.000      1.25156    1.971406
        deadyrs |  -.1996848   .0307968    -6.48   0.000    -.2600453   -.1393242
       deadyer1 |  -.0007055   .0001916    -3.68   0.000     -.001081   -.0003299
       deadyer2 |   .0002881   .0001096     2.63   0.009     .0000732    .0005029
       deadyer3 |  -3.63e-06   .0000208    -0.17   0.861    -.0000443    .0000371
          _cons |  -4.576117   .4978103    -9.19   0.000    -5.551807   -3.600427
---------------------------------------------------------------------------------

. 
. 
. *Model J: dropping the dyadic difference variable*
. *logit deadlyl polave polavesq pcenerg diff1 demloi engypop logdist cntgdumy allydumy capratio onemajor deadyrs
>  deadyer*, cluster(dyadid)
. logit deadlyl c_polave c_polavesq pcenerg diff1 demloi engypop logdist cntgdumy allydumy capratio onemajor dead
> yrs deadyer*, cluster(dyadid)

Iteration 0:   log pseudolikelihood = -5039.3877  
Iteration 1:   log pseudolikelihood = -4367.0591  
Iteration 2:   log pseudolikelihood = -3928.2369  
Iteration 3:   log pseudolikelihood =  -3921.382  
Iteration 4:   log pseudolikelihood = -3921.3334  
Iteration 5:   log pseudolikelihood = -3921.3334  

Logistic regression                             Number of obs     =    619,104
                                                Wald chi2(15)     =    1472.38
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -3921.3334               Pseudo R2         =     0.2219

                            (Std. Err. adjusted for 18,488 clusters in dyadid)
------------------------------------------------------------------------------
             |               Robust
     deadlyl |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    c_polave |  -.0940791   .0398381    -2.36   0.018    -.1721604   -.0159978
  c_polavesq |  -.0406902   .0118406    -3.44   0.001    -.0638974   -.0174831
     pcenerg |   -.498339   .1464537    -3.40   0.001     -.785383   -.2112951
       diff1 |   .4506284   .1272716     3.54   0.000     .2011807    .7000761
      demloi |  -.0956186   .0333197    -2.87   0.004     -.160924   -.0303132
     engypop |  -.0325908   .0428657    -0.76   0.447    -.1166061    .0514245
     logdist |  -.2287147   .0572319    -4.00   0.000    -.3408872   -.1165423
    cntgdumy |   1.493576   .4334997     3.45   0.001     .6439324     2.34322
    allydumy |  -.3724721   .1732446    -2.15   0.032    -.7120252   -.0329189
    capratio |    2.41587   .4749579     5.09   0.000     1.484969     3.34677
    onemajor |   1.662243   .1834795     9.06   0.000      1.30263    2.021856
     deadyrs |  -.1987855   .0293701    -6.77   0.000    -.2563498   -.1412213
    deadyer1 |  -.0007243   .0001872    -3.87   0.000    -.0010912   -.0003574
    deadyer2 |    .000301    .000108     2.79   0.005     .0000892    .0005127
    deadyer3 |  -6.35e-06   .0000208    -0.31   0.760    -.0000471    .0000344
       _cons |  -7.346027   .9002996    -8.16   0.000    -9.110582   -5.581473
------------------------------------------------------------------------------

. 
. *NOTE: we could also use demcom here, but need to drop pcenerg bc it is redundant*
. *logit deadlyl c_regstrength c_regstrsq diff1 demloi engypop logdist cntgdumy allydumy capratio onemajor deadyr
> s deadyer*, cluster(dyadid)
. *results are similar*
. 
. 
. 
end of do-file

. log close
      name:  <unnamed>
       log:  /Users/Mark 1/Dropbox/Grant Proposals ICES/ISQ Response/Accepted/replication/replicating table 3.log
  log type:  text
 closed on:  10 Jun 2015, 16:31:54
-----------------------------------------------------------------------------------------------------------------
